﻿@extends('/home/layout/layout')@section('tittle', '商品列表')
@section('css')
<link rel="stylesheet" type="text/css" href="{{asset('/HomeCss/css/common.css')}}"/>
<link rel="stylesheet" type="text/css" href="{{asset('/HomeCss/css/productlist.css')}}">
@endsection
@section('searchvalue', $key)
@section('con')
<div style="background-color:#f9f9f9;" >
      <div class="w1200"  >
        <div class="search-result" @if(empty($key)) style='display:none;' @else style='display:block;' @endif>
            <p class="result-row">
                <span class="retxt">您搜索的：</span><em>"{{$key}}"</em>&emsp;我们为你找到<em>{{$data['count']}}</em> 件相关商品。
            </p>
        </div>
        <!--选择器start-->
        <div id="selector">
            <div class="filter-section" >
                <!--面包屑导航start-->
                <div class="filter-breadcrumb clearfix">
                    <div class="breadcell">
                        <a href="{{asset('/')}}" id='baseName' title='好乐买' style='color:black'>好乐买 </a>  &gt; @if($type =='') @foreach($type['tname'] as $k=>$v)<a  href="{{asset('/list/search?id='.$type['tid'][$k])}}"  title="{{$v}}" > {{$v}} </a> &gt;@endforeach @endif &emsp;&emsp;&emsp;
                        <span  class="bread-item"><a @if($data['gbrand']==null) style='display:none;' @else style='display:block;'  @endif title="24" name="size" class="filter-tag" href="{{asset('/list/search?id='.$id.'&key='.$key)}}">
                        {{$request['gbrand']}}<span class="cate-delete"></span></a></span>

                    </div>
                    <div ><a href="{{asset('/list/search?id='.$id.'&key='.$key)}}" class="fbread-del">全部取消</a></div>
                </div>
                <!--面包屑导航end-->
                <!--选择列表start-->
                <div class="filter-wrapper" style='margin-bottom:50px;' > 
                    <div class="section-item "  @if($data['gbrand']==null) style='display:block;' @else style='display:none;'  @endif >
                        <h5 class="filter-label">品牌:</h5>
                        <div class="filter-con" >
                            <span class="filter-all">
                                <a href="javascript:void(0)" class="check">全部</a>
                            </span>
                            <!--分类列表项start-->
                            <div class="filter-list">
                                <ul class="clearfix">
                                    <li class="cate-item">
                                        <a href="{{asset('/list/search?id='.$id.'&key='.$key.'&gbrand=耐克')}}" name=" " val="">耐克</a>
                                    </li>
                                    <li class="cate-item">
                                        <a href="{{asset('/list/search?id='.$id.'&key='.$key.'&gbrand=李宁')}}" name=" " val="">李宁</a>
                                    </li>
                                    <li class="cate-item">
                                        <a href="{{asset('/list/search?id='.$id.'&key='.$key.'&gbrand=阿迪达斯')}}" name=" " val="">阿迪达斯</a>
                                    </li>
                                </ul>
                                <p class="checkmore-result" style="display:none;">
                                    <span class="subtn">确定</span>
                                    <span class="calbtn">取消</span>
                                </p>
                            </div>
                            <!--分类列表项end-->                          
                            <a class="emore show-all" style="display:none;">更多<span class="trige"></span></a>
                         
                        </div>
                    </div>
                </div>
            </div>
            <div class="catmore"></div>
        </div>     
        <div class="prolist-container">
            <div class="prolist-head" id="listheader">
        <div class="pro-catetab">
        <!--排序参数-->
        <!-- END -->
        <a href="{{asset('/list/search?id='.$id.'&key='.$key.'&gbrand='.$data['gbrand'])}}" name="sort" @if(empty($data['zkprice'] || $data['scnt'] || $data['status'])) class="ordby_default cur" @else class="ordby_default" @endif val="">默认</a>
        <a href="{{asset('/list/zkprice?zkprice='.$data['zkprice'].'&id='.$id.'&key='.$key.'&gbrand='.$data['gbrand'])}}" name="sort" 
         @if($data['zkprice'] == 'asc') class="ordby_pr cur down" @elseif($data['zkprice'] == 'desc') class="ordby_pr cur up" @else class="ordby_pr" @endif 
         id='zkprice' val="">价格<i></i></a>
        <a href="{{asset('/list/scnt?scnt='.$data['scnt'].'&id='.$id.'&key='.$key.'&gbrand='.$data['gbrand'])}}" name="sort" 
         @if($data['scnt'] == 'asc') class="ordby_pr cur down" @elseif($data['scnt'] == 'desc') class="ordby_pr cur up" @else class="ordby_pr" @endif 
         id='scnt' val="">销量<i></i></a>
        <a href="{{asset('/list/recent?status='.$data['status'].'&id='.$id.'&key='.$key.'&gbrand='.$data['gbrand'])}}" name="sort" @if($data['status'] == 'asc') class="ordby_pr cur up" @else class="ordby_pr " @endif  val="">最新</a>
    </div>
    <div class="propage-info">
        <span class="pro-number">共找到<em>{{$data['count']}}</em> 个商品 &emsp;&emsp;</span>
    </div>
</div> 
            <div class="prolist-main">
                <ul class="clearfix">
                	@foreach($goods as $k=>$v)
                    <li class="gl-item" comid="17431040" >
                        <div id="js-promotion-10999" comid="17431040">
                            <div class="proleft-icofilter-conn"></div>
                            <div class="proright-icon">
                            	<img @if($v->status) src="{{asset('/HomeCss/picture/c6f98409247ae45866510607e45f8ba4.png')}}" @else src="{{asset('/HomeCss/picture/eac9037a8e51ebf0e0522c23f42c26b9.png')}}" @endif >
                            </div>
                        </div>
                        <div class="gl-wrap">
                            <div class="gl-img ">
                                <a href="{{asset('/goods/index?id='.$v->gid)}}" target="_blank" title="{{$v->gname}}" >
                                <img class="pdImg" name="lazyload" alt="{{$v->gname}}" width='270px' height='270px' src="{{asset($v->gpic)}}"/>
                                <!--<img class="pdImgB" name="lazyload" alt="" src="{{asset('/home/picture/31559d9311099d01a8abf2138c00c538.jpg')}}"/>-->
                                </a>
                            </div>
                            <p class="gl-name">
                                <a href="{{asset('/goods/index?id='.$v->gid)}}" target="_blank" title="{{$v->gname}}">{{$v->gname}}</a> 
                            </p>
                            <p class="gl-price">
                                ￥<span class="okprice"  name="price" id="17431040">{{$v->zkprice}}</span><span class="oksale">(<em>{{$v->dcont}}</em>折)</span><span class="market-price">{{$v->price}}</span>
                            </p>
                            <p class="gl-sale-info" style="visibility:hidden;">
                            </p>
                        </div>
                    </li>
                    @endforeach
                </ul>
            </div>
            <div class="prolist-page">
            <style type="text/css">
                .pagination{padding:0px;display:inline-block;}
                .pagination li{text-align:center;display:inline-block;font-size:18px;}
                .pagination li a{padding:0px 7px;color:#000;margin-right:12px;}
                .pagination li span{padding:0px 6px;border-radius:3px;margin-right:12px;}
                .active span{color:#fff;background-color:#D70057;}

            </style>
            {!! $goods->appends($request)->render() !!}
            <script type="text/javascript">
            console.log($('.pagination li:last-child a').text());
            if($('.disabled').text()=='«'){
                $('.disabled').text('上一页');
            }
            if($('.disabled').text()=='»'){
                $('.disabled').text('下一页');
            }
            if($('.pagination li:eq(0) a').text()=='«'){
                $('.pagination li:eq(0) a').text('上一页');
            }
            if($('.pagination li:last-child a').text()=='»'){
                $('.pagination li:last-child a').text('下一页');
            }
            //移入事件
            $('.pagination li:eq(0) a').mouseover(function(){

            })
            </script>
            </div> 
        </div>
</div>
@endsection
@section('js')
<script type="text/javascript">
	
</script>
<script type="text/javascript">
	cdn_url = "http://0.js.lx.okbuycdn.com/resources/"
</script>
<script type="text/javascript" src="{{asset('/HomeCss/js/jquery-confirmmini.js')}}"></script>
<script type="text/javascript" src="{{asset('/HomeCss/js/jquery.topsuggest.js')}}"></script>
<script type="text/javascript" src="{{asset('/HomeCss/js/scrolltotop.js')}}"></script>
<script type="text/javascript" src="{{asset('/HomeCss/js/getprices.js')}}"></script>
<script type="text/javascript" src="{{asset('/HomeCss/js/promotion.js')}}"></script>
<script type="text/javascript" src="{{asset('/HomeCss/js/topslide.js')}}"></script>
<script type="text/javascript" src="{{asset('/HomeCss/js/jquery.lazyload.js')}}"></script>
<script type="text/javascript" src="{{asset('/HomeCss/js/jquery.easing.js')}}"></script>
<script type="text/javascript" src="{{asset('/HomeCss/js/list.js')}}"></script>
<script type="text/javascript" src="{{asset('/HomeCss/js/jquery-dialog-min.js')}}"></script>
<script type="text/javascript" src="{{asset('/HomeCss/js/default.js')}}"></script>
@endsection